home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Toolbox / Visual Basic Toolbox (P.I.E.)(1996).ISO / file_mgt / vbdrop / vbdrop.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1994-10-11  |  3.2 KB  |  89 lines

  1. VERSION 2.00
  2. Begin Form frmTrashCan 
  3.    BorderStyle     =   3  'Fixed Double
  4.    Caption         =   "Dust Bin"
  5.    ClientHeight    =   735
  6.    ClientLeft      =   2505
  7.    ClientTop       =   4755
  8.    ClientWidth     =   2025
  9.    Height          =   1140
  10.    Icon            =   VBDROP.FRX:0000
  11.    Left            =   2445
  12.    LinkTopic       =   "Form1"
  13.    MaxButton       =   0   'False
  14.    MinButton       =   0   'False
  15.    ScaleHeight     =   735
  16.    ScaleWidth      =   2025
  17.    Top             =   4410
  18.    Width           =   2145
  19.    WindowState     =   1  'Minimized
  20.    Begin MsgBlaster cbkDragDrop 
  21.       Prop8           =   "Click on ""..."" for the About Box ---->"
  22.       Prop9           =   "Click on ""..."" for the Message Center --->"
  23.       Left            =   1380
  24.       MsgList         =   VBDROP.FRX:0302
  25.       MsgPassage      =   VBDROP.FRX:0366
  26.       TargetName      =   "frmTrashCan"
  27.       Top             =   120
  28.       UserMsgs        =   VBDROP.FRX:0398
  29.       Version         =   "2.0"
  30.    End
  31.    Begin Image imgTrash 
  32.       Height          =   480
  33.       Index           =   1
  34.       Left            =   720
  35.       Picture         =   VBDROP.FRX:0735
  36.       Top             =   90
  37.       Visible         =   0   'False
  38.       Width           =   480
  39.    End
  40.    Begin Image imgTrash 
  41.       Height          =   480
  42.       Index           =   0
  43.       Left            =   150
  44.       Picture         =   VBDROP.FRX:0A37
  45.       Top             =   90
  46.       Visible         =   0   'False
  47.       Width           =   480
  48.    End
  49. Option Explicit
  50. ' Copyright 
  51.  1994 by Computer Technologies, Inc. All rights reserved.
  52. Sub cbkDragDrop_Message (MsgVal As Integer, wParam As Integer, lParam As Long, ReturnVal As Long)
  53. ' Copyright 
  54.  1994 by Computer Technologies, Inc. All rights reserved.
  55.     Dim tFileNames          As String
  56.     Select Case MsgVal
  57.         Case WM_SYSCOMMAND
  58.             If wParam = IDM_ABOUT Then Call APP_About
  59.         Case WM_DROPFILES
  60.             Me.Icon = imgTrash(1).Picture
  61.             Me.Refresh
  62.             Screen.MousePointer = 11
  63.             tFileNames = UT_DropFileNames(MsgVal, wParam, lParam)
  64.             APP_DeleteFiles tFileNames
  65.             Screen.MousePointer = 0
  66.             Me.Icon = imgTrash(0).Picture
  67.             Me.Refresh
  68.     End Select
  69. End Sub
  70. Sub Form_Load ()
  71. ' Copyright 
  72.  1994 by Computer Technologies, Inc. All rights reserved.
  73.     Dim nMsgCtr         As Integer
  74.     Dim hMenu           As Integer
  75.     Dim nResult         As Integer
  76.     nMsgCtr = UT_DropEnable((Me.hWnd), Me.cbkDragDrop, 0, True)
  77. ' Now we get a copy of the system menu and remove the seperator bars.
  78.     hMenu = APIGetSystemMenu((frmTrashCan.hWnd), False)
  79.     nResult = APIDeleteMenu(hMenu, 0, MF_BYCOMMAND)
  80.     nResult = APIDeleteMenu(hMenu, 0, MF_BYCOMMAND)
  81. ' Add our own 'About...' item to the menu
  82.     nResult = APIAppendMenu(hMenu, MF_SEPARATOR, 0, "")
  83.     nResult = APIAppendMenu(hMenu, MF_ENABLED Or MF_STRING, IDM_ABOUT, "About ...")
  84. ' Tell message blaster that we want to see menu commands
  85.     cbkDragDrop.MsgList(nMsgCtr + 1) = WM_SYSCOMMAND
  86. ' Show the about box ...
  87.     Call APP_About
  88. End Sub
  89.